<?php

require_once dirname(__FILE__).'/../lib/listfvtaGeneratorConfiguration.class.php';
require_once dirname(__FILE__).'/../lib/listfvtaGeneratorHelper.class.php';

/**
 * listfvta actions.
 *
 * @package    odontopc
 * @subpackage listfvta
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class listfvtaActions extends autoListfvtaActions
{
  public function executeListImprimir(sfWebRequest $request){
    $filtro = new VtaFactFormFilter();
    $consulta = $filtro->buildQuery($this->getFilters());
    $vta_fact = $consulta->execute();
    
    $dompdf = new DOMPDF();
    $dompdf->load_html($this->getPartial("imprimir", array("vta_fact" => $vta_fact)));
    $dompdf->set_paper('A4','portrait');
    $dompdf->render();
    $dompdf->stream("vta_fact.pdf");    
    return sfView::NONE;
  }
}
